﻿using System.IO;

namespace N2.Explorer
{
	using Web;
	
	static class VirtualPathUtility
	{
		public static string ResolveUrl(string url)
		{
			if (string.IsNullOrEmpty(url)) {
				return string.Empty;
			}
			
			return
				Path.Combine(
					ConfigurationService.SessionSettings.AppRoot,
					Url.ToAbsolute(url)
						.Substring(1))
					.Replace('/', Path.DirectorySeparatorChar);
		}
	}
}
